package facade

import "fmt"

type CarModel struct{}

func NewCarModel() *CarModel {
	return &CarModel{}
}

func (c *CarModel) SetModel() {
	fmt.Println("Setting car model")
}

type CarEngine struct{}

func NewCarEngine() *CarEngine {
	return &CarEngine{}
}

func (c *CarEngine) SetEngine() {
	fmt.Println("Setting car engine")
}

type CardBody struct{}

func NewCarBody() *CardBody {
	return &CardBody{}
}

func (c *CardBody) SetCarBody() {
	fmt.Println("Setting car body")
}

type CarFacade struct {
	carModel  CarModel
	carEngine CarEngine
	carBody   CardBody
}

func (c *CarFacade) CreateCompleteCar() {
	c.carModel.SetModel()
	c.carEngine.SetEngine()
	c.carBody.SetCarBody()
}

func NewCarFacade() *CarFacade {
	return &CarFacade{
		carModel:  CarModel{},
		carEngine: CarEngine{},
		carBody:   CardBody{},
	}
}
